<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <title>碳素云文档系统</title>
    <meta content="{$Page.PageDescription}" name="Description">
    <meta content="{$Page.PageKeywords}" name="Keywords">
    <meta charset="UTF-8">
    <!--坑爹的IE兼容-->
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!--坑爹的将360默认为极速模式打开-->
    <meta name="renderer" content="webkit">
    <!--移动优先-->
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!--图标引入-->

    <!-- Bootstrap css file v3.2.0 -->
    <link rel="stylesheet" type="text/css" href="/css/bootstrap.css">
    <link href="/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>

    <!--代码美化-->
    <link href="/css/jquery.snippet.css" rel="stylesheet" type="text/css"/>

    <!--[if lte IE 7]>
    <link href="/css/font-awesome-ie7.min.css" rel="stylesheet" type="text/css"/>
    <![endif]-->

    <!--[if lt IE 9]>
    <script src="http://cdn.bootcss.com/html5shiv/3.7.0/html5shiv.min.js"></script>
    <script src="http://cdn.bootcss.com/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->

    <link href="/css/mooshroom.css" rel="stylesheet" type="text/css"/>
    <link href="/css/code.css" type="text/css" rel="stylesheet"/>

    <!-- jQuery 1.7.2 or higher -->
    <script type="text/javascript" src="/js/jquery-1.7.2.min.js"></script>
</head>
<body>
<!--导航-->
<nav class=" navbar-inverse" role="navigation">

    <div class="navbar-header">
        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navMain">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand" href="#">
            <img alt="home" src="/img/MooshroomFace.png" class="alive-hover">
        </a>
    </div>
    <div class="collapse navbar-collapse" id="navMain">
        <ul class="nav navbar-nav">
            <li><a title="首页" href="/">首页</a></li>
            <% if (user) { %>

            <li><a title="发表" href="/post">新文章</a></li>
            <li><a title="上传" href="/upload" target="_blank">上传图片</a></li>

            <% } else { %>
            <li><a title="首页" href="/">首页</a></li>
            <% } %>
        </ul>
        <form class="navbar-form navbar-left" method="post" id="doc">
            <div class="form-group">
                <input type="text" name="title" class="form-control" placeholder="文章标题" style="width: 500px"
                        <% if (post.title != undefined){ %>
                       value="<%= post.title %>"
                        <% } %>
                        >
            </div>
            <input type="submit" value="保存" class="btn btn-danger"/>

        </form>
        <ul class="nav navbar-nav navbar-right">
            <% if (user) { %>

            <li><a title="登出" href="/logout">登出</a></li>
            <% } else { %>
            <li><a title="登录" href="/login">登录</a></li>
            <li><a title="注册" href="/reg">注册</a></li>
            <% } %>
        </ul>
    </div>

</nav>

<!--<form method="post">-->
<!--标题：<br />-->
<!--<input type="text" name="title" /><br />-->
<!--正文：<br />-->
<!--<textarea name="post" hidden="hidden" id="post"></textarea><br />-->
<!--<input type="submit" value="发表" />-->
<!--</form>-->


<!--new-->
<body onload="prettyPrint()">
<!--顶部菜单-->
<!--<include file="Public:nav-both"/>-->

<div class="container-fluid content">
    <!--<include file="Public:nav-write"/>-->
    <div class="row">

        <!--左侧输入区-->
        <div id="doc-main-layout" class="doc-layout col-sm-6">
            <!--工具条-->
            <div class="tool" id="doc-main-tool">

                <button title="专注书写模式" class="to-write tool-item">
                    <i class="icon-edit"></i>
                </button>
                <button title="纯净阅读模式" class="to-read tool-item " hidden="hidden">
                    <i class="icon-desktop"></i>
                </button>
                <button title="实时预览模式" class="to-both  tool-item " hidden="hidden">
                    <i class="icon-columns"></i>
                </button>
            </div>

            <!--文章表单-->
            <textarea class=" alive-hover live-sroll" id="doc-main" name="post"
                      placeholder="开始书写..." autofocus form="doc">
                <% if(post.post != undefined){ %>
                <%= post.post %>
                <% } %>
            </textarea>

        </div>
        <!--右侧预览区-->
        <div id="doc-show-layout" class="doc-layout col-sm-6">
            <div class="tool" id="doc-show-tool">
                <button title="专注书写模式" class="to-write tool-item " hidden="hidden">
                    <i class="icon-edit"></i>
                </button>
                <button title="纯净阅读模式" class="to-read tool-item">
                    <i class="icon-desktop"></i>
                </button>
                <button title="实时预览模式" class="to-both tool-item " hidden="hidden">
                    <i class="icon-columns"></i>
                </button>
            </div>
            <div id="doc-show" class="alive-hover markdown-preview live-sroll">


            </div>
            <div id="read-only" hidden="hidden" class="markdown-preview">

            </div>
        </div>

    </div>
</div>

<!--閱讀模式專用工具條-->
<div class="tool-fixed " id="read-only-tool" hidden="hidden">
    <button title="专注书写模式" class="to-write tool-item " hidden="hidden">
        <i class="icon-edit"></i>
    </button>
    <button title="纯净阅读模式" class="to-read tool-item">
        <i class="icon-desktop"></i>
    </button>
    <button title="实时预览模式" class="to-both tool-item " hidden="hidden">
        <i class="icon-columns"></i>
    </button>
</div>




<%- include footerDoc %>


